<template>
  <a_page>
    <!-- <a列表页头工具栏 :list="list" :详情="详情" /> -->
    <a工具栏 :list="list" />
    <el-table :ref="list.表ref" border tooltip-effect="dark" :data="单项组" @selection-change="list.选中变了" class="全高-工具栏-60"
      row-key="id" @sort-change="list.sortChange" :default-sort="a.默认排序" empty-text="空空如也~~"
      :onHeaderDragend="list.列宽拖动">
      <el-table-column type="selection" width="40"/>
      <!-- <el-table-column align="left" label="id" width="60" prop="id">
        <template #default="scope">
          <el-button type="primary" link icon="link" @click="详情.初始化(scope.row)">{{ scope.row.id
          }}</el-button>
        </template>
      </el-table-column> -->
      <template v-for="字段 in 插组件.列表显示字段s.value" :key="字段.名称">
        <a列表字段 :插组件="插组件" :字段="字段" :编辑否="list.a.编辑否" />
      </template>
      <!-- <a列表字段 :插组件="插组件" :编辑否="list.a.编辑否" /> -->
      <!-- <el-table-column align="left" label="行业" prop="行业" width="120" />
      <el-table-column align="left" label="客户单位" prop="客户单位" width="120" />
      <el-table-column align="left" label="项目名称" prop="项目名称" width="120" />
      <el-table-column align="left" sortable label="预计招标时间" prop="预计招标时间" width="180">
        <template #default="scope">{{ fmt时间(scope.row.预计招标时间) }}</template>
      </el-table-column> -->

      <!-- 末尾列 -->
      <el-table-column align="left" sortable label="修改时间" prop="UpdatedAt" width="180">
        <template #default="scope">{{ fmt时间(scope.row.UpdatedAt) }}</template>
      </el-table-column>
      <el-table-column align="left" label="操作" fixed="right">
        <template #default="scope">
          <!-- <el-button link icon="DocumentCopy" @click="详情.复制(scope.row)">复制</el-button> -->
          <el-button type="danger" link icon="delete" @click="list.删(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <div class="gva-pagination">
      <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="req.page" :page-size="req.pageSize"
        :page-sizes="a.可选页面容量" :total="a.total" @current-change="list.跳转页面" @size-change="list.改单页条数" />
    </div>
  </a_page>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted, onBeforeUnmount, watch } from 'vue'
import { fmt时间 } from '@/utils'
import * as util from '@/amtf/utils';

import a工具栏 from '@/components/a工具栏.vue';
const props = defineProps({
  url: String,
})

import { ElMessage } from 'element-plus'
// const handleSuccess = (res) => {
//   if (res.code === 0) {
//     ElMessage.success('导入成功')
//     // emit('on-success')
//   } else {
//     ElMessage.error(res.msg)
//   }
// }
const cfg = {
  req: {
    pageSize: 20,
  },
  a: {
  },
  筛选设置: {
  }
}
import use from '@/hooks/uselist';
const list = use(cfg)
const { 插组件, a, 单项组, req } = list

const 详情ref = ref()
</script>

<style lang="scss" scoped></style>
